package com.bdv.md.service.impl;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bdv.md.dao.TransHistoryDao;
import com.bdv.md.model.TransHistory;
import com.bdv.md.service.TransHistoryService;

@Service("transHistoryService")
@Transactional(readOnly = true)

public class TransHistoryServiceImpl implements TransHistoryService {

	@Autowired
	private TransHistoryDao transHistoryDao;
	
	public List<TransHistory> findByTransactionId(String transactionId) {
		return transHistoryDao.findByTransactionId(transactionId);
	}

	public List<TransHistory> findByRange(Timestamp start, Timestamp end, String type, String meterId) {
		return transHistoryDao.findByRange(start, end, type, meterId);
	}
}
